#include<iostream>
#include<queue>
#include<algorithm>
#include<cmath>
using namespace std;
typedef long long LL;
const int N = 1e5 + 10;
int n, p, q;
int main()
{
	cin >> n >> p >> q;
	priority_queue<LL>heap;
	for (int i = 1; i <= n; i++) {
		int x;
		cin >> x;
		heap.push(x);
	}
	/*while (p--) {
		LL t = heap.top();
		heap.pop();
		LL x = sqrt(t);
		heap.push(x);
	}
	while (q--) {
		LL t = heap.top();
		heap.pop();
		LL x = t / 2;
		heap.push(x);
	}*/
	while (1) {
		LL z = heap.top();
		if (q || p) heap.pop();
		else break;
		if (z != 1) {
			if (p) {
				LL x = sqrt(z);
				heap.push(x);
				p--;
			}
			else if (q) {
				LL x = z / 2;
				heap.push(x);
				q--;
			}
			else break;
		}
		else {
			if (q) {
				LL x = z / 2;
				heap.push(x);
				q--;
			}
			else if (p) {
				LL x = sqrt(z);
				heap.push(x);
				p--;
			}
			else break;
		}
	}
	LL ans = 0;
	while (heap.size()) {
		ans += heap.top();
		//cout << heap.top() << " ";
		heap.pop();
	}
	cout << ans << endl;
	return 0;
}